<#-- 定义宏，输出单选 -->
<#macro drawSingleChoice attr>
	<input type="radio" <#if attr.value.attrValue?default(0) == 0> checked="checked" </#if> value=0  name="projectAttrValues[${attr.attrId}].attrValue" class="${attr.cssClass?default('')} ${attr.validate?default('')}">是
	<input type="radio"  <#if attr.value.attrValue?default(0) == 1> checked="checked" </#if> value=1 name="projectAttrValues[${attr.attrId}].attrValue" class="${attr.cssClass?default('')} ${attr.validate?default('')}">否
</#macro>

<#-- 定义宏，输出备注 -->
<#macro drawMemo  attr>
	<textarea rows="3" cols="20" class="${attr.cssClass?default('')} ${attr.validate?default('')}"  name="projectAttrValues[${attr.attrId}].attrValue">${attr.value.attrValue?default('')}</textarea>
	
</#macro>

<#-- 定义宏，输出文本框 -->
<#macro drawTextField attr>
	<input type="text"   name="projectAttrValues[${attr.attrId}].attrValue" value="${attr.value.attrValue?default('')}"  class="${attr.cssClass?default('')} ${attr.validate?default('')}">
</#macro>
<table>
	<#list parameters.attrs?chunk(2) as row>
			<tr>
				<#list row as cell>
					<td>
						${cell.attrName}:
					</td>
					<td>
						<#switch cell.outputType?default(0)>
	  						<#case 0>
	    						<@drawTextField attr=cell/>
	    					<#break>
	  						<#case 1>
	 							<@drawSingleChoice attr=cell/>
	    					<#break>
							<#case 2>
								<@drawMemo attr=cell/>
	    					<#break>
	  						<#default>
	  							<@drawTextField attr=cell/>
						</#switch>
					</td>
				</#list>
			</tr>
	</#list>
</table>